REM generate  docs
rem requires eudoc and creolehtml from euphoria svn
rem depends on EUDIR but should change to a locally edited eu.cfg
@echo off


:* location of eudoc and creole executables or to interpret


rem choose executable
set EUDOCS=eudoc.exe
set CREOLE=creolehtml.exe

rem choose interpreted
set EUDOCS=eui -BATCH %EUDIR%\source\eudoc\eudoc.ex
set CREOLE=eui -BATCH %EUDIR%\source\creole\creolehtml.ex
set EUDOCS=eui -BATCH %EUDIR%\docs\eudoc\eudoc.ex
set CREOLE=eui -BATCH %EUDIR%\docs\eudoc\creole\creolehtml.ex



if "%1"=="." goto dot

del euqt.txt

REM add -v for verbose incase of trouble
echo Starting eudoc
%EUDOCS%  -v -a euqt40.af  -o euqt.txt

rem eudoc should probably throw a real error, is not setting ERRORLEVEL
rem so reverting to deleting the output txt and checking exists after eudoc

IF EXIST euqt.txt goto :docreole
echo there was a problem with eudoc
pause
exit

:docreole
echo Starting creolehtml
%CREOLE%  -v=ON -A=ON -t=eutmpl.html  euqt.txt

@echo hit enter to run dot on euqt, need dot installed
@pause


:dot
echo Starting dependancy graph of euqt

rem svn2706 or a few earlier dis may be having problems with dot and --html
rem add--std to include std/includes, remove -g to add call graphs

eui %EUDIR%\source\dis.ex  -i ../ ..\examples\hello.exw -g --html --dir appdis

rem dis leaves a few tmp files in the target dir or in this dir
rem probably should move them to appdis. dis.sym, dis.hash, dis.line=0
echo start appdis\index.html to see the graphs
